package com.example.weatherapi.client;

import com.example.citycommon.dto.WeatherResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "cache-service")
public interface CacheServiceClient {
    @GetMapping("/cache")
    WeatherResponse getWeatherFromCache(@RequestParam("cityid") String cityId);

    @PostMapping("/cache")
    void saveWeatherToCache(@RequestParam("cityid") String cityId, @RequestBody WeatherResponse weatherResponse);
}
